/*
 * Copyright 2020-2021 redragon.dongbin
 *
 * This file is part of redragon-erp/赤龙ERP.

 * redragon-erp/赤龙ERP is free software: you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation, either version 2 of the License, or
 * (at your option) any later version.

 * redragon-erp/赤龙ERP is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.

 * You should have received a copy of the GNU General Public License
 * along with redragon-erp/赤龙ERP.  If not, see <https://www.gnu.org/licenses/>.
 */
package com.erp.inv.output.dao.model;

import java.util.Date;
import java.util.List;
import javax.persistence.Column;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.MappedSuperclass;
import javax.persistence.Transient;
import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;

import com.erp.masterdata.common.model.BaseModel;
import lombok.Data;

@Data
@MappedSuperclass
public class InvOutputHeadBase extends BaseModel {

    //Constructors
    public InvOutputHeadBase() {
    }
    
    //Fields
    
    //主键
    @Id
    @GeneratedValue(strategy=GenerationType.IDENTITY)
    @Column(name = "output_head_id", unique = true, nullable = false)
    private Integer outputHeadId;

    //出库单编码
//    @NotBlank(message="出库单编码不能为空")
    @Column(name = "output_head_code", unique = true, nullable = false, length = 45)
    private String outputHeadCode;

    //出库类型（销售出库SO_OUT、购入退出PO_RETURN、盘点出库CHECK_OUT）
//    @NotBlank(message="出库类型不能为空")
    @Column(name = "output_type")
    private String outputType;

    //出库来源类型（销售订单SO）
    //@NotBlank(message="数据来源类型不能为空")
    @Column(name = "output_source_type")
    private String outputSourceType;

    //出库来源头编码（销售订单头编码）
    //@NotBlank(message="来源单据编码不能为空")
    @Column(name = "output_source_head_code")
    private String outputSourceHeadCode;
    
    //仓库编码
//    @NotBlank(message="仓库选择不能为空")
    @Column(name = "warehouse_code")
    private String warehouseCode;

    //出库日期
//    @NotNull(message="出库日期不能为空")
    @Column(name = "output_date")
    private String outputDate;

    //实际出库日期
    @Column(name = "actual_output_date")
    private String actualOutputDate;

    //备注
    @Column(name = "memo")
    private String memo;

    //版本
    @Column(name = "version", unique = false, nullable = false)
    private Integer version;

    //状态（新建NEW，确认CONFIRM，变更ALTER，取消CANCEL）
    @Column(name = "status")
    private String status;

    //审批状态（未提交UNSUBMIT、已提交SUBMIT、已审批APPROVE、已驳回REJECT）
    @Column(name = "approve_status")
    private String approveStatus;

    //制单人
//    @NotBlank(message="制单人不能为空")
    @Column(name = "staff_code")
    private String staffCode;

    //制单公司
//    @NotBlank(message="制单人不能为空")
    @Column(name = "company_code")
    private String companyCode;

    //制单部门
//    @NotBlank(message="制单部门不能为空")
    @Column(name = "department_code")
    private String departmentCode;
    
    @Column(name = "attribute1")
    private String attribute1;
    
    @Column(name = "attribute2")
    private String attribute2;

    @Column(name = "attribute3")
    private String attribute3;

    @Column(name = "attribute4")
    private String attribute4;

    @Column(name = "attribute5")
    private String attribute5;

    @Column(name = "attribute6")
    private String attribute6;

    @Column(name = "attribute7")
    private String attribute7;

    @Column(name = "attribute8")
    private String attribute8;

    @Column(name = "attribute9")
    private String attribute9;

    @Column(name = "attribute10")
    private String attribute10;
    
    public String getAttribute10() {
        return attribute10;
    }
    public void setAttribute10(String attribute10) {
        this.attribute10 = attribute10;
    }
    
    
    
    //显示字段
    @Transient
    private String staffName;
    @Transient
    private String departmentName;
    @Transient
    private String warehouseAddress;
    @Transient
    private String outputSourceHeadName;
    @Transient
    private String customerName;
    @Transient
    private String customerContactDesc;
    @Transient
    private List<InvOutputLine> invOutputLines;

    @Transient
    private String stockCode;
    @Transient
    private String stockNumber;
    @Transient
    private String billType;
    @Transient
    private String billHeadCode;
    @Transient
    private String billLineCode;
    @Transient
    private String orgCode;

    private String nextapproverid;



}